package java8_28.oop.Javatest_1;

public class TestingCenter {
    private String tel;
    private String addess;

    public TestingCenter(String tel, String addess) {
        this.tel = tel;
        this.addess = addess;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getAddess() {
        return addess;
    }

    public void setAddess(String addess) {
        this.addess = addess;
    }
    public void check(Car car){
        if (car instanceof Dazhong){
            Dazhong dazhong=(Dazhong)car;
            car.brake();
            car.quicken();
            car.start();
        }else if (car instanceof Wuling){
            Wuling wuling=(Wuling)car;
            car.start();
            car.quicken();
            car.brake();
        }else if (car instanceof  Benchi){
            Benchi benchi=(Benchi)car;
            car.start();
            car.quicken();
            car.brake();
        }
    }
}
